package com.cy.store.service;

import com.cy.store.pojo.Cart;
import com.cy.store.vo.CartVo;

import java.util.List;

public interface ICartService {

    /**
     * 将商品插入到购物车中
     * @param uid
     * @param pid
     * @param count
     * @param username
     */
  void  addToCart(Integer uid,Integer pid,Integer count,String username);

    /**
     * 查找uid的收货地址
     * @param uid
     * @return
     */
  List<CartVo> getVOByUid(Integer uid);

    /**
     * 增加购物车里面的商品数量
     * @param cid
     * @param uid
     * @param username
     * @return
     */
  Integer updateNumByCid(Integer cid,Integer uid,String username);

  /**
   * 减少购物车里面的商品数量
   * @param cid
   * @param uid
   * @param username
   * @return
   */
  Integer reduceNum(Integer cid,Integer uid,String username);

  /**
   * 结算是查询被选中的商品
   * @param uid
   * @param cids
   * @return
   */
  List<CartVo> getVOByCid(Integer uid,Integer[] cids);
}
